#!/usr/bin/env bash

set -e

function copyReplace {
  sed "s/](.\/docs\//](.\//g" $1 > $2
}

copyReplace CODE_OF_CONDUCT.md docs/code_of_conduct.md
copyReplace CONTRIBUTING.md docs/contributing.md
copyReplace LICENSE docs/license.md

echo "preparing contributors..."
node scripts/get-contributors.js

echo "preparing packages..."
./scripts/get-ajv-packages
